<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="https://cdn.bootcss.com/Swiper/3.4.2/css/swiper.min.css" rel="stylesheet">
    <style>
        *{margin: 0; padding: 0}
        li{list-style: none}
        .box{
            width: 800px;
            margin:50px auto;
        }
        .swiperTab{
            width: 100%;
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;
        }
        .swiperTab li{
            flex: 1;
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;
            height: 48px;
            cursor: pointer;
            background-color: #ddf8ff;
            border-left: 1px solid #dfdfdf;
        }
        .swiperTab li:first-child{
            border-left: 1px solid transparent;
        }
        .swiperTab li.active {
            color: #fff;
           background-color: #ff6600;
        }
        .swiperTab li:nth-child(1).active{
            background-color: yellowgreen ;
        }
        .swiperTab li:nth-child(2).active{
            background-color: green ;
        }
        .swiperTab li:nth-child(3).active{
            background-color: pink ;
        }
        .swiper-slide{
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
            padding: 20px;
        }
        .swiper-slide:nth-child(1){
            background-color: yellowgreen ;
            height: 200px;
        }
        .swiper-slide:nth-child(2){
            background-color: green;
            height: 300px;
        }
        .swiper-slide:nth-child(3){
            background-color: pink;
            height: 100px;
        }

    </style>
</head>
<body>
<div class="box">
    <ul class="swiperTab">
        <li> <span>Div+CSS</span> </li>
        <li> <span>JavaScript+JQuery</span> </li>
        <li> <span>AngularJS+Vue+NodeJs</span> </li>
    </ul>
    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide">千寻Div+CSS</div>
            <div class="swiper-slide">阿飞JavaScript+JQuery</div>
            <div class="swiper-slide">无虑AngularJS+Vue+NodeJs</div>
        </div>
    </div>
</div>

<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/Swiper/3.4.2/js/swiper.jquery.min.js"></script>
<script src="js/swiperTab.js"></script>
<script>
    /*swiper选项卡切换*/
    $(function () {
        $('.swiperTab > li').eq(0).addClass('active');
        tabs('.swiperTab > li','.swiper-container','active');
    });
</script>
</body>
</html>